import service from '@/utils/request'

export const useDeviceApi = (dataForm: any) => {
	return service.post('/device/queryById', dataForm)
}

export const useDeviceSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/device/save', dataForm)
	} else {
		return service.post('/device/save', dataForm)
	}
}

export const editDevice = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/device/listUpdate', dataForm)
	} else {
		return service.post('/device/listUpdate', dataForm)
	}
}
